package main_UI;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;

import Comp.kukhyun_comp;
import Comp.mingi_comp;
import Comp.wonkyung_cmp;

import Comp.jaeyeob_cmp;

import Comp.daehee_comp;


import UI_Comp.*;

public class mainFrame extends JFrame {
	
	kukhyun_comp kukcomp = new kukhyun_comp();
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	mainFrame(String title){
		super(title);
		
		addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent evt)
			{
				System.exit(0);	
			}
		});

		init();
		
		this.setSize(750,500);
		this.setLocationRelativeTo(null);
		this.setVisible(true);
	}
	
	
	void init(){
		JPanel mainPanel = new JPanel();
		mainPanel.setLayout(new GridLayout(2, 3));
		
		/////////////////kukhyun Panel////////////////////////////////////////////////
		/* Subject 2 
		ImageComponent kukhyunPanel = new ImageComponent(new ImageIcon("image\\kh.jpg").getImage(), 250, 250);
		*/
		
		/* Subject 1 
		kukhyunPanel.setBackground(Color.yellow);
		*/
		
		/* Subject 3 */
		int value[] = {23,24,35,2,66,34,17,8};
		
		JPanel kukhyunPanel = new JPanel();
		
		kukhyunPanel.add(kukhyun_comp.Kukchart(value));

		
		
		/////////////////jaeyeob Panel////////////////////////////////////////////////
		/* Subject 2 */
		//jaeyeob_cmp jaeyeobPanel = new jaeyeob_cmp (new ImageIcon("image\\jy.jpg").getImage(), 250, 240);

		/* Subject 1 */
		//jaeyeobPanel.setBackground(Color.red);
		
		/* Subject 3 */
		int jy_value[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
		
		JPanel jaeyeobPanel = new JPanel();
		
		jaeyeobPanel.add(jaeyeob_cmp.jaeyeobChart(jy_value));
		//jaeyeob_cmp jaeyeobPanel = new jaeyeob_cmp();
		
		
		////////////////wonkyung Panel////////////////////////////////////////////////
/*
		JPanel wonkyungPanel=new JPanel();
		wonkyung_cmp wkcmp=new wonkyung_cmp();
		//wkcmp.make_Panel(wonkyungPanel);		//return void...
		wonkyungPanel=wkcmp.make_Panel(wonkyungPanel);
*/		
		/////////////////mingi Panel///////////////////////////////////////////////////
		 JPanel mingiPanel = new JPanel();
		 mingiPanel.add(mingi_comp.mingiChart());
		 
		//mingiPanel.setBackground(Color.blue);
		
		/////////////////daehee/////////////////////////////////////////////////////
		String row[] = {"row01", "row02", "row03"};
		String col[] = {"col01", "col02", "col03", "col04", "col05"};
		
		JPanel daeheePanel = new JPanel();
		daehee_comp dhcmp = new daehee_comp();
		daeheePanel.add(daehee_comp.DHchart(row, col));
		 /*
		ImageComponent daeheePanel = null;
		daeheePanel = dhComp.dh_getImg(daeheePanel);	
		*/	
		//ImageComponent daeheePanel = new ImageComponent(new ImageIcon("image\\dh.jpg").getImage(), 250, 250);
		// daeheePanel.setBackground(Color.yellow);  
		
		
		
		mainPanel.add(jaeyeobPanel);
		mainPanel.add(kukhyunPanel);
	//	mainPanel.add(wonkyungPanel);
		mainPanel.add(mingiPanel);
		mainPanel.add(daeheePanel);
		
		
		this.add(mainPanel);
	}
	
	public static void main(String[] args){
		new mainFrame("test");
		
	}

}
